package com.xuliugen.rpc.consumer;

import com.xuliugen.rpc.api.RpcCalc;
import com.xuliugen.rpc.proxy.RpcProxy;

/**
 * RpcCalc消费者
 * @author xuliugen
 * @date 2018/6/6
 */
public class RpcCalcConsumer {

    public static void main(String[] args) {

        //获取代理对象
        RpcCalc rpcCalc = RpcProxy.getProxy(RpcCalc.class);

        //执行远程调用
        System.out.println(rpcCalc.add(1, 3));
        System.out.println(rpcCalc.sub(4, 1));
        System.out.println(rpcCalc.mult(3, 4));
        System.out.println(rpcCalc.div(9, 3));
    }
}
